package cn.edu.jnu.entity;

import java.awt.*;

/**
 * 功能：背景物体
 * 作者：陈爱国
 * 日期：2024/8/9 23:10
 */
public class BgObj extends GameObj {
    public BgObj() {
        super();
    }

    public BgObj(Image img, int x, int y, double speed) {
        super(img, x, y, speed);
    }

    @Override
    public void paintSelf(Graphics gImage) {
        super.paintSelf(gImage);
        y+=speed;

        if(y>=0){
            y = -2000;
        }
    }
}
